package com.dzb.service.Impl;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.ScalarHandler;

import com.dzb.dao.DoctorDao;
import com.dzb.dao.Impl.DoctorDaoImpl;
import com.dzb.entity.Doctor;
import com.dzb.entity.Pages;
import com.dzb.service.DoctorService;
import com.dzb.util.DruidUtils;

public class DoctorServiceImpl implements DoctorService{
	
	
	DoctorDao doctorDao = new DoctorDaoImpl();
	
	
	@Override
	public Pages<Map<String, Object>> doctorList(Doctor doctor, int page, int sIZE) {
		return doctorDao.doctorList( doctor, page, sIZE);
	}

	@Override
	public boolean checkUserNameIsEqual(String username) {

		return doctorDao.checkUserNameIsEqual(username);
	}

	@Override
	public int addDoctor(Doctor doctor) {
		// TODO Auto-generated method stub
		return doctorDao.addDoctor(doctor);
	}

	@Override
	public int delete(String id) {
		
		return doctorDao.delete(id);
	}

	@Override
	public Doctor findDoctorById(int did) {
		// TODO Auto-generated method stub
		return doctorDao.findDoctorById(did);
	}

	@Override
	public List<Doctor> getdoctors() {
		
		return doctorDao.getdoctors();
	}

	@Override
	public Doctor getRegisterInfo(String did) {
		// TODO Auto-generated method stub
		return doctorDao.getRegisterInfo(did);
	}
	
	
	

	


}
